home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Multimedia Toolkit
/
Multimedia Toolkit.iso
/
fli
/
dta.doc
< prev
next >
Wrap
Text File
|
1993-09-12
|
17KB
|
471 lines
DTA (Dave's .TGA Animation Program)
Rel 2.0.5 (09/12/93)
Copyright (c) 1991, 1992, 1993 by David K. Mason
DTA is a command-line utility for creating Autodesk Animator .FLI
and .FLC animation files from:
o .TGA files as created by the POV-Ray and POLYRAY ray-tracers.
o .IMG files as created by the Vivid ray-tracer.
o .PCX files.
o .GIF files.
o Other .FLI or .FLC files.
o Presidio .ANI animation files
DTA can also perform a wide range of post-processing functions
on image files including:
o Creating a single optimal 256-color palette from a series of
truecolor pictures, and then creating an Autodesk Animator .FLI
file out of them.
o Rescaling.
o Multi-layer compositing.
o Saving the palette as a .COL file, readable by either Autodesk
Animator or the TGAFLI animation utility.
o Saving the palette as a .MAP file, readable by the PICLAB and
IMPROCES image processors, and the FRACTINT fractal generator.
o Reading in a palette file in either .COL or .MAP format
and animating a bunch of pictures using that palette.
o Animating a bunch of pictures using grayscale.
o Convert pictures to .GIF, .TGA, and graycale .TIF files.
o Averaging images together for a variety of effects, including
simulated motion blur and red/blue 3D.
o And more.
----------------------------------------------------------------------
**** IF YOU ARE HAVING MEMORY PROBLEMS WITH DTA, READ THIS ****
Real mode vs. Protected mode:
DTA used to come in two varieties: a real mode version and
a protected mode version. From now on there's only a
protected mode version. There's no more DTAX.EXE.
DTA will let you access up to 16MB of extended memory (either raw
or configured as XMS with HIMEM.SYS or QEMM386.SYS or whatever).
It requires at least 1 or 2 MB of RAM to run at all.
Don't delete the files DPMI16BI.OVL, RTM.EXE, and DPMIINST.EXE.
These make up the protected mode drivers for Borland Pascal 7.0
(the compiler used to build DTA). DTA won't run without them.
----------------------------------------------------------------------
The Rules:
Feel free to re-upload this program to other bulletin board
systems in its *original, unmodified* form. You may not
repackage it with other programs. You may not repackage it with
your own tutorial. I feel like an idiot having to make these
demands, but I've been finding archives on BBSs going by
names like MORPHPAK.ZIP which are collections of DTA, my other
program DMorf, sometimes also Richard Godoeken's program
RMORPH, plus Trilobyte's PLAY. That's not kosher. I and those
other folks distributed our programs the way we did for
reasons.
Do not include this program on a disk along with any magazine,
book, hardware product, or other software product without my
permission.
----------------------------------------------------------------------
Syntax:
DTA (filenames) (switches)
----------------------------------------------------------------------
Input Formats:
.TGA Targa 16-,24-,32-bit compressed/uncompressed,
or 8-bit grayscale uncompressed.
.GIF GIF (87a or 89a, but NO interlacing).
.PCX PC Paintbrush 256-color or 24-bit PCX images.
.IMG Vivid raytracer 24-bit RLE output.
.FLI and
.FLC Autodesk Animator/Animator Pro animation files.
.ANI Presidio PC Animate Plus animation files.
.LZH LHArc compressed archive containing files in the above
picture formats.
.ZIP PKZIP compressed archive containing files in the above
picture formats.
.ARJ ARJ compressed archive containing files in the above
picture formats.
@afile Process all files listed in a text file "afile".
----------------------------------------------------------------------
Switches:
(Output options)
/O[name] Specify an output filename.
/FF Create a .FLI animation file. [default]
/FM Create a PICLAB .MAP palette file.
/FC Create an Autodesk Animator .COL palette file.
/FG Create .GIF file[s].
/FT Create new .TGA file[s].
/FI Create grayscale TIFF files
(Targa Output options)
/NC Do NOT compress .TGA file
/B## Number of bits per pixel in TGA ( 8/16/*24*/32 )
or FLIC (*8/16). (If you specify /b16 for a flic
you'll get a Tempra FLX instead of a FLI or FLC.)
(.FLI output options)
/P Play in ping-pong, or pendulum, oscillation order.
/Snnn Specify display speed of animation playback (default=0).
/R[#] Specify resolution:
1 = 320x200 [default]
2 = 320x240
3 = 320x400
4 = 320x480
5 = 360x480
6 = 640x480
7 = N/A
8 = 800X600
9 = N/A
10 = 1024x768
11 = N/A
12 = 1280x1024
/RA Base resolution on the size of the first input
file.
(Palette options)
/G Use 64-level greyscale instead of a palette.
/G32 Use 32-level greyscale insted of a palette.
/332 Use 3/3/2 palette.
/Upalname Use existing .MAP or .COL file for palette.
/M# Set maximum internal colors.
/MN Do NOT remap colormapped input.
/PO Force single optimal palette generation even when
creating GIF files.
/C# Scan only one frame per # for palette.
(Dithering options)
/DF Dither with Floyd-Steinberg filter.
/DS Dither with Sierra-Lite filter.
/DO[1-6] Ordered dither (digit represents dither strength).
/DR# Random noise dither (digit represents dither strength).
(Other options)
/L Separates output layers. Picture files specified
in later layers get overlayed on top of previous
layers. If the overlayed pictures contain transparency
informations (32-bit TGA files only), then the
pictures underneath will show through.
/K# Use only one frame per # picture files. Skip the rest.
/3D Create red/blue 3D picture.
/A[#|A] Average <number> TGAs per output frame (A=All).
/T[#|A] Trail <number> TGAs per output frame (A=All).
/X[num] eXpand <number>. Create and insert <number> averaged.
frames between each pair of regular frames.
/GA# Gamma-correct picture. Try specifying a number
between 1.0 and 2.0 to brighten, between 0.5 and
1.0 to darken.
/SC[#,#] Rescale pictures to screen resolution.
/CL[#,#,#,#] Clip the input picture. The first two numbers
specify the top-left, and the other two numbers
control the width and depth.
/CH#,#,# Chroma-key, to make all occurrences of a color
transparent for compositing. The three numbers
represent the red,green, and blue components
of the key color.
/CT# Chroma-key tolerance. Specifies how close to the
key color a pixel has to be to make it transparent.
----------------------------------------------------------------------
Revision History:
(see WHATSNEW.DTA)
----------------------------------------------------------------------
Averaging/Trailing/Expansion modes (/A /T /X switches) examples:
Averaging 5 input pictures with "/A2" option:
Average: To produce:
file 1 frame 1
file 2
file 3 frame 2
file 4
file 5 frame 3
file 1
Trailing 4 input pictures with "/T2" option:
Average: To produce:
file 1 frame 1
file 2
file 2 frame 2
file 3
file 3 frame 3
file 4
file 4 frame 4
file 1
Trailing 5 input pictures with "/T3" option:
Average: To produce:
file 1 frame 1
file 2
file 3
file 2 frame 2
file 3
file 4
file 3 frame 3
file 4
file 1
file 4 frame 4
file 5
file 1
file 5 frame 5
file 1
file 2
Expanding 2 input pictures with "/X1" option:
frame 1 = (100% of FILE 1 ) + ( 0% of FILE 2 )
frame 2 = ( 50% of FILE 1 ) + ( 50% of FILE 2 )
frame 3 = ( 0% of FILE 1 ) + (100% of FILE 2 )
Expanding 2 input pictures with /X2" option:
frame 1 = (100% of FILE 1 ) + ( 0% of FILE 2 )
frame 2 = ( 66% of FILE 1 ) + ( 33% of FILE 2 )
frame 3 = ( 33% of FILE 1 ) + ( 66% of FILE 2 )
frame 4 = ( 0% of FILE 1 ) + (100% of FILE 2 )
----------------------------------------------------------------------
Miscellaneous examples:
DTA ROCKET*.TGA /FC /OROCKET
Make a palette for all .TGA files starting with "ROCKET".
Output the palette to an Animator palette file called "ROCKET.COL".
DTA SKY.GIF /L BEFORE.TGA MORF*.TGA AFTER.TGA
Build a multilayer flic. SKY.GIF gets put in the background, and
the pictures FIRST.TGA, a bunch of TGAs beginning with the string
MORF, and LAST.TGA get superimposed over it. SKY.GIF shows through
any parts of the other pictures which are transparent.
This example assumes that the pictures BEFORE.TGA and AFTER.TGA
had transparency added to them with my other program, DMorf
(Rel. 1.1 or higher), and that the MORF*.TGA files are morphed
pictures built with DMorf.
DTA PIC1 PIC2 PIC3 /FM /OXYZ
Make a palette for .TGA files "PIC1.TGA", "PIC2.TGA", and "PIC3.TGA"
Output the palette to a PICLAB palette file called "XYZ.MAP".
DTA ROCKET* /OROCKET /DF
Make input from all .TGA files beginning with "ROCKET".
Output to an animation file called "ROCKET.FLI".
Dither the frames.
DTA ROCKET* /G /DO2 /P
Make input from all .TGA files beginning with "ROCKET".
Map colors to grayscale.
Dither, using ordered dither strength 2.
Ping-pong it.
Output to an animation with the default name of "ANIM.FLI"
DTA ROCKET
Make input from ROCKET.TGA.
Output to an animation with the default name of "ANIM.FLI".
DTA @WING2.LST /S10 /OWING2.FLI
Make input from files listed in a text file called "WING2.LST".
Set playback speed to "10".
Output to an animation with the name of "WING2.FLI".
DTA BBB*.TGA AAA*.TGA /UPAL1.COL /UPAL2.MAP /OFRED
Make input from all .TGA files whose name begins with "BBB", and "AAA".
NOTE:
The "BBB" files will appear in the animation before the "AAA" files.
The "BBB" files will be sorted alphabetically, and so will the
"AAA" files, but separately.
Read in an Animator palette file called "PAL1.COL", and merge it with
a Piclab palette file called "PAL2.MAP".
Use this combined palette for the animation.
Output to an animation with the name of "FRED.FLI".
DTA *.TGA /FG
Make .GIFs from all .TGAs in the current directory.
DTA SOMBRERO /FG /DR2 /G
Make a dithered grayscale .GIF from a file called SOMBRERO.TGA.
DTA LEFT*.TGA RGHT*.TGA /3D
Make a red/blue 3D .FLI file .
Use the .TGA files beginning with "LEFT" as the red component
And the ones beginning with "RGHT" as the blue component.
NOTE: For this to work right, there must be an equal number of
"LEFT" and "RGHT" .TGAs.
Output to an animation with the default filename of "ANIM.FLI"
DTA XXX* /FTYY /AA
Make input from .TGAs beginning with "XXX".
Average all files.
Output to a new Targa file called "YY.TGA".
NOTE: averaging will work with up to 10 files, but no more.
DTA XXX*.TGA /T3 /DO3 /OZZZ
Make input from all .TGA files beginning with "XXX"
Trail 3 frames.
Use ordered dithering, strength 3.
Output an animation called "ZZZ.FLI"
DTA XXX*.TGA /X3
Make input from all .TGA files beginning with "XXX"
Expand 3. Assuming 5 .TGA input files, this would create a 15 frame
animation.
Output an animation called "ANIM.FLI"
DTA *.GIF
Creates a file called ANIM.FLI from all .GIF files in the current
directory.
DTA *.TGA /K2 /C2
Assuming 60 .TGA files, create a flic containing only 30 frames.
Generate the palette from only 15 frames.
DTA *.GIF /SC
Create a flic from a bunch of GIF files, and rescale all the
images to the screen size (320x200).
DTA *.TGA /R6 /SD240
Create a 640x480 FLC file from a bunch of TGA files. Rescale each
picture so that the depth is 240, but leave the width alone.
This one is useful when you want to turn a bunch of 320x200
pictures into a 640x480 flic... because 320x200 screens use a
different aspect ratio than 640x480. 320x200 pictures look a
bit squat when you display them in 640x480 mode, but 320x240 looks
correct.
DTA FLIC1.FLI FLIC2.FLI /OFLIC3
Create a new flic by appending two existing flics. Unlike my old
FLAP program, DTA will create a new palette.
DTA FLIC.FLI /FG /NM
Create GIF files from the frames in FLIC.FLI. The /NM is required
to tell DTA *not* to generate an optimized palette. That would be
a waste of time, since a FLIC file already contains an optimized
palette.
----------------------------------------------------------------------
Speed concerns:
DTA is fastest when you use grayscale instead of a palette.
If you let DTA generate its own palette, DTA is still
relatively speedy. It gets (lots) slower if you dither.
If you create an animation from .TGA files stored in an
archive file (.LZH, .ZIP, .ARJ), then DTA is REAL slow, because
it takes time to shell out to the de-archiving program.
ZIP files compress the least, but PKUNZIP is the fastest
dearchiver. ARJ files compress really well, but the dearchiver
is the slowest. LZH files compress well, but not as well as
ARJ, and LHA's speed is somewhere between ARJ and PKUNZIP.
If you average multiple files or rescale pictures, that is going
to slow things down.
----------------------------------------------------------------------
Credits:
To create palettes and select colors from palettes, this
program uses an algorithm that I found in an article called "A
Simple Method for Color Quantization: Octree Quantization," by
Michael Gervautz and Werner Purgathofer, which can be found in
a book called "Graphics Gems," edited by Andrew S. Glassner. I
recommend this book highly.
The .FLI file format was explained in a document called
FLIDOC.TXT from Jim Kent's FLILIB. I wasn't able to use this C
library in DTA, since I do my coding in Pascal, but the
document contained all the info I needed. (Jim Kent is also
the guy who, with Tom Hudson, wrote TGAFLI, and who developed
Animator and Animator Pro.)
More thanks to Jim Kent for his info about 640x480 .FLIs on
BIX.
Thanks to Dan Farmer, Alexander Enzmann, Jeff Bowermaster,
and others for their excellent suggestions.
Thanks to Dan Farmer for sprucing up this documentation
file.
Thanks to Tim Wegner for talking me into finally adding GIF89a
input.
Thanks to the Cafe Pamplona in Harvard Square for being such
a cool place to swill coffee and discuss ray-tracing and animation.
----------------------------------------------------------------------
Disclaimer:
If you use DTA, you do so at your own risk. I won't be held
responsible if it screws anything up.
----------------------------------------------------------------------
Support:
If you've got any requests/bug reports/suggestions, send a message
to:
"David Mason" on the "You Can Call Me Ray" BBS, (708) 358-5611,
and on "The Graphics Alternative", (510) 524-2780,
and on "Channel 1" BBS, (617) 354-8873.
"76546,1321" on Compuserve.
You'll probably get some kind of a response (maybe sooner, maybe
later)
----------------------------------------------------------------------
Money matters:
DTA is a shareware program. If you think this program is worth
it, send some money or some computer hardware or something to:
David K. Mason
P.O. Box 181015
Boston, MA 02118
I think $35 is an appropriate amount, but feel free to send more
or less.